package com.example.dbg.controller;

import com.example.dbg.model.po.User;
import com.example.dbg.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @user DBG_ZXX
 * @date 2018/10/16 17:57
 * @desc
 **/
@Controller
public class UserController {

    @Autowired
    UserServiceImpl userServiceImpl;


    @RequestMapping(value = "getAllUser" ,method = RequestMethod.GET)
    List<User> getAllUser(){
        return userServiceImpl.selectAll();
    }

    @RequestMapping(value = "index" ,method = RequestMethod.GET)
    public String index(){
        System.out.println("首页index");
        return "index";
    }

//    @RequestMapping(value = "login" ,method = RequestMethod.GET)
//    public String login(){
//        System.out.println("login");
//        return "login";
//    }

    @RequestMapping(value = "memberList" ,method = RequestMethod.GET)
    public String memberList(){
        System.out.println("memberList");
        return "member-list";
    }

//    @RequestMapping(value = "testNew" ,method = RequestMethod.GET)
//    public String testNew(){
//        System.out.println("testNew");
//        return "_blank";
//    }
}
